<?php
class hieulib_Db_Table  extends Zend_Db_Table_Abstract{
	

       public  function __construct($config = null){
          //get Db, if empty DB return setDefaultDB.
          if(isset($this->_db)){

                        $dbAdapters = Zend_Registry::get('Config');
                         
                        $config = $dbAdapters->getDb($this->_db);
                        Zend_Db_Table::setDefaultAdapter($config);
                     }
          return parent::__construct($config);
       }
}